//SPDX-FileCopyrightText: Copyright 2022-2024 深圳市同心圆网络有限公司
//SPDX-License-Identifier: GPL-3.0-only

package project_watch_api_serv

import (
	"atomgit.com/openlinksaas/proto-gen-go.git/project_comment_api"
	"atomgit.com/openlinksaas/proto-gen-go.git/project_watch_api"
)

func convertTargetType(targetType project_watch_api.WATCH_TARGET_TYPE) project_comment_api.COMMENT_TARGET_TYPE {
	if targetType == project_watch_api.WATCH_TARGET_TYPE_WATCH_TARGET_ENTRY {
		return project_comment_api.COMMENT_TARGET_TYPE_COMMENT_TARGET_ENTRY
	}
	if targetType == project_watch_api.WATCH_TARGET_TYPE_WATCH_TARGET_REQUIRE_MENT {
		return project_comment_api.COMMENT_TARGET_TYPE_COMMENT_TARGET_REQUIRE_MENT
	}
	if targetType == project_watch_api.WATCH_TARGET_TYPE_WATCH_TARGET_TASK {
		return project_comment_api.COMMENT_TARGET_TYPE_COMMENT_TARGET_TASK
	}
	if targetType == project_watch_api.WATCH_TARGET_TYPE_WATCH_TARGET_BUG {
		return project_comment_api.COMMENT_TARGET_TYPE_COMMENT_TARGET_BUG
	}
	if targetType == project_watch_api.WATCH_TARGET_TYPE_WATCH_TARGET_TEST_CASE {
		return project_comment_api.COMMENT_TARGET_TYPE_COMMENT_TARGET_TEST_CASE
	}
	return project_comment_api.COMMENT_TARGET_TYPE_COMMENT_TARGET_ENTRY
}
